<!--
 * @Author: zhangweinan
 * @Date: 2022-12-14 09:50:15
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-01-06 17:31:58
 * @Description: file content
 * @FilePath: \front-end-of-task-center\src\views\roles\invitation\startDialog\index.vue
-->
<template>
  <el-dialog
    title="提示"
    :visible.sync="dialogTabsVisible"
    :width="width"
    @close="Cancel"
  >
    <p class="linxuan_p">开启邀约十分钟后将正式发送短信邀请,开启后不能取消！</p>
    <span slot="footer" class="dialog-footer">
      <span @click="dialogTabsVisible = false" class="close_btn">取消</span>
      <span @click="startOperate" class="close_btn addInvitationStyle"
        >确定</span
      >
    </span>
  </el-dialog>
</template>
<script>
import { startExpertInvitation } from "@/api/enterprise/invitation";
export default {
  name: "startDialog",
  props: {
    width: {
      type: String,
      require: false,
      default: "30%",
    },
    id: {
      type: String,
    },
  },
  data() {
    return {
      activeName: "second",
      dialogTabsVisible: false,
    };
  },
  methods: {
    show() {
      this.dialogTabsVisible = true;
    },
    Cancel() {
      this.dialogTabsVisible = false;
    },
    startOperate() {
      startExpertInvitation(this.id).then((res) => {
        this.$message.success("开启成功！");
        this.dialogTabsVisible = false;
        this.$emit("startInvitation", true);
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.linxuan_p {
  display: flex;
  flex-direction: column;
  margin-bottom: 60px;
  span {
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
  }
  .ok_style {
    margin-bottom: 20px;
  }
}
.addInvitationStyle {
  margin-left: 12px;
  color: #ffffff;
  background: #4877ee;
}
::v-deep .el-dialog__body {
  padding-top: 0 !important;
}
::v-deep .el-dialog__title {
  font-weight: bold;
}
</style>
<style>
.close_btn {
  display: inline-block;
  cursor: pointer;
  width: 82px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  border-radius: 3px;
  font-size: 14px;
  font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  font-weight: 500;
  color: #4877ee;
  border: 1px solid #4877ee;
}
</style>
